﻿using System;
using System.Collections.Generic;
using System.Windows;
using Dsl.Ped.Controls.ProjectiveControl;

namespace Dsl.Ped.Editor.Services
{
    /// <summary>
    /// Service handling and registering addIns.
    /// Basically pairs the data type with a specific namespace and file extension
    /// </summary>
    public interface IAddInRegistrationService
    {
        /// <summary>
        /// Get the registerd <see cref="Type"/> by the corresponding namespace
        /// </summary>
        /// <param name="xmlNamespace">Namespace registered with the type</param>
        /// <returns>Type that has been registered with the given namespace, null if the namespace hasn't been registered</returns>
        Type GetRegisteredType(string xmlNamespace);

        List<ViewMode> GetRegisteredViewModes(string xmlNamespace);

        /// <summary>
        /// Get the namespace registered for a given object type
        /// </summary>
        /// <param name="type">Object type registered with the namespace</param>
        /// <returns></returns>
        string GetNamespaceByType(Type type);

        /// <summary>
        /// Get all registered object types
        /// </summary>
        /// <returns>All registered object types</returns>
        Dictionary<string, Type> GetRegisteredTypes();

        /// <summary>
        /// Get the resource dictionary of a given type
        /// </summary>
        /// <param name="type">Type whose resource dictionary we are looking for</param>
        /// <returns>Resource dictionary registered for the given type</returns>
        ResourceDictionary GetResourceDictionaryByType(Type type);
    }
}
